package com.zcxy.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.zcxy.mybatis.util.MySqlInjector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 单数据源配置（purvar.datasource.open = false时生效）
 *
 * @Author
 */
@Configuration
@MapperScan(value = {"com.zcxy.**.mapper"})
public class MybatisPlusConfig {

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }


    @Bean
    public MySqlInjector sqlInjector() {
        return new MySqlInjector();
    }



}
